package service

import "usplatformserver/internal/model"

// int为0值时，golang默认处理成null，这里OrganType改为*int类型
type PatientLesionsListRequest struct {
	OrganType    *int   `form:"organType" binding:"required,gte=0"`
	PatientStamp string `form:"patientStamp"`
}

// 根据图片信息查询病灶信息请求参数
type PatientLesionsInfoByImageInfoRequest struct {
	OrganType *int `form:"organType" binding:"required,gte=0"`
	ImageId   *int `form:"imageId" binding:"required,gte=0"`
	ImageType *int `form:"imageType" binding:"required,gte=0"`
}

// 获取甲状腺病灶列表
func (svc *Service) GetThyroidLesionsList(param *PatientLesionsListRequest) ([]*model.ThyroidLesionsInfo, error) {
	return svc.dao.ThyroidLesionsList(param.PatientStamp)
}

// 获取乳腺病灶列表
func (svc *Service) GetBreastLesionsList(param *PatientLesionsListRequest) ([]*model.BreastLesionsInfo, error) {
	return svc.dao.BreastLesionsList(param.PatientStamp)
}

// 根据图片信息查询甲状腺病灶信息
func (svc *Service) GetThyroidLesionsInfoByImageInfo(imageId, imageType int) (*model.ThyroidLesionsInfo, error) {
	return svc.dao.GetThyroidLesionsInfoByImageInfo(imageId, imageType)
}

// 根据图片信息查询乳腺病灶信息
func (svc *Service) GetBreastLesionsInfoByImageInfo(imageId, imageType int) (*model.BreastLesionsInfo, error) {
	return svc.dao.GetBreastLesionsInfoByImageInfo(imageId, imageType)
}

// 查询甲状腺病灶信息（按时间倒序）
func (svc *Service) GetThyroidLesionsListDescByTime(patientStamp string) ([]*model.ThyroidLesionsInfo, error) {
	return svc.dao.GetThyroidLesionsListDescByTime(patientStamp)
}

// 查询乳腺病灶信息（按时间倒序）
func (svc *Service) GetBreastLesionsListDescByTime(patientStamp string) ([]*model.BreastLesionsInfo, error) {
	return svc.dao.GetBreastLesionsListDescByTime(patientStamp)
}
